# coding: utf-8

"""
    SnapTrade

    Connect brokerage accounts to your app for live positions and trading

    The version of the OpenAPI document: 1.0.0
    Contact: api@snaptrade.com
    Created by: https://snaptrade.com/
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from snaptrade_client import schemas  # noqa: F401


class OptionChainItem(
    schemas.DictSchema
):
    """
    This class is auto generated by Konfig (https://konfigthis.com)
    """


    class MetaOapg:
        
        class properties:
            expiryDate = schemas.StrSchema
            description = schemas.StrSchema
            listingExchange = schemas.StrSchema
            optionExerciseType = schemas.StrSchema
        
            @staticmethod
            def chainPerRoot() -> typing.Type['OptionChainItemChainPerRoot']:
                return OptionChainItemChainPerRoot
            __annotations__ = {
                "expiryDate": expiryDate,
                "description": description,
                "listingExchange": listingExchange,
                "optionExerciseType": optionExerciseType,
                "chainPerRoot": chainPerRoot,
            }
        additional_properties = schemas.AnyTypeSchema
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["expiryDate"]) -> MetaOapg.properties.expiryDate: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["listingExchange"]) -> MetaOapg.properties.listingExchange: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["optionExerciseType"]) -> MetaOapg.properties.optionExerciseType: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["chainPerRoot"]) -> 'OptionChainItemChainPerRoot': ...
    
    @typing.overload
    def __getitem__(self, name: str) -> MetaOapg.additional_properties: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["expiryDate"], typing_extensions.Literal["description"], typing_extensions.Literal["listingExchange"], typing_extensions.Literal["optionExerciseType"], typing_extensions.Literal["chainPerRoot"], str, ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["expiryDate"]) -> typing.Union[MetaOapg.properties.expiryDate, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["listingExchange"]) -> typing.Union[MetaOapg.properties.listingExchange, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["optionExerciseType"]) -> typing.Union[MetaOapg.properties.optionExerciseType, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["chainPerRoot"]) -> typing.Union['OptionChainItemChainPerRoot', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: str) -> typing.Union[MetaOapg.additional_properties, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["expiryDate"], typing_extensions.Literal["description"], typing_extensions.Literal["listingExchange"], typing_extensions.Literal["optionExerciseType"], typing_extensions.Literal["chainPerRoot"], str, ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        expiryDate: typing.Union[MetaOapg.properties.expiryDate, str, schemas.Unset] = schemas.unset,
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        listingExchange: typing.Union[MetaOapg.properties.listingExchange, str, schemas.Unset] = schemas.unset,
        optionExerciseType: typing.Union[MetaOapg.properties.optionExerciseType, str, schemas.Unset] = schemas.unset,
        chainPerRoot: typing.Union['OptionChainItemChainPerRoot', schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ],
    ) -> 'OptionChainItem':
        return super().__new__(
            cls,
            *args,
            expiryDate=expiryDate,
            description=description,
            listingExchange=listingExchange,
            optionExerciseType=optionExerciseType,
            chainPerRoot=chainPerRoot,
            _configuration=_configuration,
            **kwargs,
        )

from snaptrade_client.model.option_chain_item_chain_per_root import OptionChainItemChainPerRoot
